package com.az.usr.listener;

import com.az.usr.UserInfo;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class RabbitmqListener {
    @RabbitListener(queues = "queue1")
    public void receive(Message message, UserInfo user) {
        System.out.println(user.getUserId());
        System.out.println(message.getMessageProperties().getMessageId());
        byte[] body = message.getBody();
    }
}
